package com.zhangshuo.patternDesign.decorator;

/**
 * Created by shuo.zhang on 2017-10-23.
 */
public class Decorator extends  AbstarctDecorator {

    public Decorator(IComponent component) {
        super(component);
    }


    public void method1(){
        System.out.println("添加新的方法");
    }


    @Override
    public void method() {
        System.out.println("对原先的行为做下扩展");
        super.method();
        System.out.println("对原先的行为进行扩展2");
    }
}
